//
//  YPBuzHomePage_vc.swift
//  YPSwift
//  主页页面
//  Created by ogawa on 2020/5/25.
//  Copyright © 2020 ogawa. All rights reserved.
//

import UIKit

class YPBuzHomePage_vc: YPCoreBase_vc {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.red;
        self.loginBtn.backgroundColor = UIColor.blue
    }
    
    lazy var loginBtn : UIButton = {
        let loginBtn = UIButton.init(type: .custom)
        loginBtn.setTitle("去登录", for: .normal)
        loginBtn.titleLabel?.font = .systemFont(ofSize: 14)
        self.view.addSubview(loginBtn)
        
        loginBtn.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview()
            make.size.equalTo(CGSize(width: 150, height: 36))
        }
        
        loginBtn.rx.tap
           .map{("login",nil)}
           .bind(to: self.view.rx_openUrl)
           .disposed(by: disposeBag)
        
        return loginBtn
    }()

}
